/**
 *
 */
package us.oh.k12.wkw.robot.command;

/**
 * @author Team4145
 *
 */
public class LauncherAngleIncreaseSpeedCmd extends CommandWithTimeout {

    final double speed;

    public LauncherAngleIncreaseSpeedCmd() {
        this(0.5, 0.1);
    }

    public LauncherAngleIncreaseSpeedCmd(double pSpeed) {
        this(0.5, pSpeed);
    }

    public LauncherAngleIncreaseSpeedCmd(final double pTimeout, final double pSpeed) {
        super("AngleIncreaseSpeedCmd", pTimeout);
        this.speed = pSpeed;
        this.requires(this.getLaunchFrisbeeSystem());
    }

    protected void execute() {

        try {

            //this.debug("execute()", "Called.");
            this.getLaunchFrisbeeSystem().increaseAngleSpeed(this.speed);

        } catch (Exception anEx) {
            this.error("execute()", anEx);
        }
    }

    protected boolean isFinished() {
        return true;
    }
}
